home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 353_02 / protype1.cpp < prev    next >
C/C++ Source or Header  |  1992-01-18  |  678b  |  35 lines

  1.                                       // Chapter 4 - Program 1
  2. #include <iostream.h>
  3.  
  4. void do_stuff(int wings, float feet, char eyes);
  5.  
  6. main()
  7. {
  8. int arm = 2;
  9. float foot = 1000.0;
  10. char lookers = 2;
  11.  
  12.    do_stuff(3, 12.0, 4);
  13.    do_stuff(arm, foot, lookers);
  14. }
  15.  
  16. void do_stuff(int wings, float feet, char eyes)
  17. {
  18.    cout << "There are " << wings << " wings." << "\n";
  19.    cout << "There are " << feet << " feet." << "\n";
  20.    cout << "There are " << (int)eyes << " eyes." << "\n\n";
  21. }
  22.  
  23.  
  24.  
  25.  
  26. // Result of execution
  27. //
  28. // There are 3 wings.
  29. // There are 12 feet.
  30. // There are 4 eyes.
  31. //
  32. // There are 2 wings.
  33. // There are 1000 feet.
  34. // There are 2 eyes.
  35.